home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / shazam11.zip / DEMOT2.DEF < prev    next >
Text File  |  1991-11-04  |  13KB  |  306 lines

  1. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  2. @@ Purpose:    Demo major capabilities/features, with running commentary.
  3.  
  4. @@ Comments:   The double "at"-sign (@@) signifies a comment.  Anything
  5. @@             after @@ is ignored.  Blank lines are also ignored.
  6.  
  7. @@ Hints:      The double semi-colon (;;) signifies a hint string.
  8. @@             Hints may be used for APPLICATION and SUBMENU elements.
  9.  
  10. @@ Keywords:   Keywords are enclosed with brackets, [ keyword ] or [keyword],
  11. @@             (spacing ignored).  When used, they are expected in the order:
  12.  
  13. @@             [ SWITCH ]
  14. @@             [ APPLICATION ]
  15. @@             [ SUBMENU ]
  16. @@             [ NEWLINE ]
  17. @@             [ STATUS ]
  18. @@             [ HINT ]
  19.  
  20. @@ NOTE:       All keywords are optional; the program will generate
  21. @@             a complete dummy application from an empty file!
  22. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  23.  
  24.  
  25. @@ ===================================================================
  26. @@ ___,/|
  27. @@ \ o_O|
  28. @@ =(_|_)=   "[SWITCH]" Section.
  29. @@    U
  30. @@   ack!    
  31. @@ ===================================================================
  32. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  33. @@ Note order-of-evaluation for switch/options:
  34. @@ 1.  *.CFG file
  35. @@ 2.  Command-line switch(es)
  36. @@ 3.  Definition file switch(es).
  37. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  38.  
  39. [ SWITCH ]
  40. /ig-                                   @@ all generated code in one file.
  41. /c                                     @@ always compile (override *.CFG &
  42.                                        @@ command-line switches)
  43.  
  44.  
  45. @@ ===================================================================
  46. @@ ___,/|
  47. @@ \ o_O|
  48. @@ =(_|_)=   "[APPLICATION]" Section.
  49. @@    U
  50. @@   ack!    Only one line long!
  51. @@ ===================================================================
  52. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  53. @@ See Technical Manual for Syntax.
  54. @@ The "label" becomes the TApplication descendant's name, prefixed
  55. @@ with "T" and suffixed with "App".  If not present, the filename is
  56. @@ used.  For example, DEMO.DEF --> "TDEMOApp.method"
  57. @@ * WARNING *  Label is also used to re-route Custom Components, and
  58. @@ should only be used for this purpose.  You can use the DefaultHint
  59. @@ anytime.
  60. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  61.  
  62. [ APPLICATION ]                ;;Optional Default Hint    @@ for hcNoContext!
  63.  
  64.  
  65.  
  66. @@ ===================================================================
  67. @@ ___,/|
  68. @@ \ o_O|
  69. @@ =(_|_)=   "[SUBMENU]" Section.
  70. @@    U
  71. @@   ack!    Usually multiple occurances.
  72. @@ ===================================================================
  73. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  74. @@ Commands of 2 words or more MUST be enclosed in quotes, because
  75. @@ the second parameter is placed on the menu.
  76. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  77.  
  78. [SUBMENU] ≡ hcSystem         ;;system functions
  79. About                        ;;program information, copyright
  80. 'Video Mode'                 ;;Change to 43/50 line mode (EGA/VGA only)
  81. 'DOS shell'                  ;;temporary exit to DOS
  82. [NEWLINE]
  83. Exit Alt-X cmQuit            ;;exit the program, return to DOS
  84.  
  85. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  86. @@ For multi-level menus, match greater-than/less-than to "indent"
  87. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  88.  
  89. [SUBMENU] file               ;;file management commands (open, save, etc)
  90. Open...    f3                ;;locate and open a file in an Edit window
  91. New        f4                ;;create a new file in a new Edit window
  92. Save       f2                ;;save the file in the active Edit window
  93. [NEWLINE]
  94. 'Change Dir...'              @@ OOPS!  There's no hint...
  95.   >[SUBMENU] Print           ;;2nd Level menu, prefaced with ">" symbol
  96.     >[SUBMENU] Hardware
  97.       Parallel-1
  98.       Parallel-2
  99.       Serial-1
  100.       Serial-2
  101.     <
  102.     >[SUBMENU] LPTx Port
  103.       Lpt~1~                    ;;Where to print @
  104.       Lpt~2~                    ;;Print Here?
  105.       Lpt~3~                    ;;How 'bout here?
  106.     <
  107.     >[SUBMENU] COMx Port
  108.       Com~1~
  109.       Com~2~
  110.       Com~3~
  111.       Com~4~
  112.       Com~5~
  113.       Com~6~
  114.       Com~7~
  115.       Com~8~
  116.     <
  117.   <
  118.   >[SUBMENU]                ;;Deliberately left blank
  119.   <
  120.  
  121. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  122. @@ Show nesting capability.
  123. @@ NOTE:  Compiler croaks at 19th SUBMENU, if options are also added...
  124. @@ ALSO:  Be sure to balance "<" and ">"
  125. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  126.  
  127. [SUBMENU] SubSubSub          ;;Try coding this by hand!
  128.  >[SUBMENU] level2           ;;deeper               @@ ───┐
  129.   >[SUBMENU]level3           ;;deeper yet          @@ ───┐│
  130.    >[SUBMENU] level4         ;;deeper and deeper  @@ ───┐││
  131.     >[ SUBMENU ] level5      ;;yup, another level@@ ───┐│││
  132.      >[SUBMENU] level6       ;;just one more... @@ ───┐││││
  133.       >[SUBMENU] level7      ;;I can't resist! @@ ───┐│││││
  134.        >[SUBMENU] level8     ;;again!         @@ ───┐││││││
  135.         >[SUBMENU] level9    ;;AGAIN!        @@ ───┐│││││││
  136.          >[SUBMENU] level10  ;;AND AGAIN!   @@ ───┐││││││││
  137.          '~0~ Option'        ;;hint         @@     │││││││││
  138.          '~1~ Option'        ;;hint         @@     │││││││││  Each ">" must
  139.          '~2~ Option'        ;;hint         @@     │││││││││  be have a
  140.          '~3~ Option'        ;;hint         @@     │││││││││  corresponding
  141.          '~4~ Option'        ;;hint         @@     │││││││││  "<", or all
  142.          '~5~ Option'        ;;hint         @@     │││││││││  subsequent
  143.          '~6~ Option'        ;;hint         @@     │││││││││  menus will be
  144.          '~7~ Option'        ;;hint         @@     │││││││││  SUBMENUs of a
  145.          '~8~ Option'        ;;hint         @@     │││││││││  previous one!
  146.          '~9~ Option'        ;;hint         @@     │││││││││
  147.          <                                  @@ ───┘││││││││
  148.         <                                   @@  ───┘│││││││
  149.        <                                    @@   ───┘││││││
  150.       <                                     @@    ───┘│││││
  151.      <                                      @@     ───┘││││
  152.     <                                       @@      ───┘│││
  153.    <                                        @@       ───┘││
  154.   <                                         @@        ───┘│
  155.  <                                          @@         ───┘
  156.  
  157. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  158. @@ Handle multiple SUBMENUs
  159. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  160.  
  161. [SUBMENU] SUBMENU      ;;Single level
  162.  >[SUBMENU] Sub~1~     ;;Create a menu!       @@ ──────┐ BALANCE THIS ">"
  163.   'Select~0~ '         ;;hint                 @@        │
  164.   'Select~1~ '         ;;hint                 @@        │
  165.   'Select~2~ '         ;;hint                 @@        │
  166.   'Select~3~ '         ;;hint                 @@        │
  167.   'Select~4~ '         ;;hint                 @@        │
  168.   'Select~5~ '         ;;hint                 @@        │
  169.   'Select~6~ '         ;;hint                 @@        │
  170.   'Select~7~ '         ;;hint                 @@        │
  171.   'Select~8~ '         ;;hint                 @@        │
  172.   'Select~9~ '         ;;hint                 @@        │
  173.   [SUBMENU] Sub~2~     ;;Dial a menu!         @@        │
  174.   [SUBMENU] Sub~3~     ;;Make a menu!         @@        │
  175.   [SUBMENU] Sub~4~     ;;Dig a menu!          @@        │
  176.   [SUBMENU] Sub~5~     ;;Dump a menu!         @@        │
  177.   [SUBMENU] Sub~6~     ;;Another Menu!        @@        │
  178.   [SUBMENU] Sub~7~     ;;Foo                  @@        │
  179.   [SUBMENU] Sub~8~     ;;Bar                  @@        │
  180.   [SUBMENU] Sub~9~     ;;If the foo sticks... @@        │
  181.  <  @@    ─────────────────────────────────────────────┘  WITH THIS "<"
  182.  
  183.  
  184. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  185. [SUBMENU] Number Items       ;;Measure confusion index...
  186. Option~0~                    ;;hint
  187. Option~1~                    ;;hint
  188. Option~2~                    ;;hint
  189. Option~3~                    ;;hint
  190. Option~4~                    ;;hint
  191. Option~5~                    ;;hint
  192. Option~6~                    ;;hint
  193. Option~7~                    ;;hint
  194. Option~8~                    ;;hint
  195. Option~9~                    ;;hint
  196.  
  197. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  198. @@ Past TurboVision screen limit
  199. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  200.  
  201. [SUBMENU] Letter Items       ;;Off the scale (or screen, as the case may be...)
  202. Option~A~                    ;;hint
  203. Option~B~                    ;;hint
  204. Option~C~                    ;;hint
  205. Option~D~                    ;;hint
  206. Option~E~                    ;;hint
  207. Option~F~                    ;;hint
  208. Option~G~                    ;;hint
  209. Option~H~                    ;;hint
  210. Option~I~                    ;;hint
  211. Option~J~                    ;;hint
  212. Option~K~                    ;;hint
  213. Option~L~                    ;;hint
  214. Option~M~                    ;;hint
  215. Option~N~                    ;;hint
  216. Option~O~                    ;;hint
  217. Option~P~                    ;;hint
  218. Option~Q~                    ;;hint
  219. Option~R~                    ;;hint
  220. Option~S~                    ;;hint
  221. Option~T~                    ;;hint
  222. Option~U~                    ;;hint
  223. Option~V~                    ;;hint
  224. Option~W~                    ;;hint
  225. Option~X~                    ;;hint
  226. Option~Y~                    ;;hint
  227. Option~Z~                    ;;hint
  228.  
  229. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  230. @@ A more typical menu...
  231. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  232. [ SUBMENU ] window           ;;open, arrange and close windows
  233. Size/move  Ctrl-F5 cmResize  ;;change the size or position of the active window
  234. Zoom            F5           ;;enlarge or restore the size of the active window
  235. Tile         Alt-T           ;;arrange windows on the desktop by tiling
  236. C~a~scade    Alt-C           ;;arrange windows on the desktop by cascading
  237. Next            F6           ;;make the next window active
  238. Previous  Shift-F6 cmPrev    ;;make the previous window active
  239. Close       Alt-F3           ;;close the active window
  240.  
  241.  
  242.  
  243. @@ ===================================================================
  244. @@ ___,/|
  245. @@ \ o_O|
  246. @@ =(_|_)=   "[STATUS]" Section.
  247. @@    U
  248. @@   ack!    Multi-Context StatusLines.
  249. @@ ===================================================================
  250. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  251. @@ FYI:   All are commented out, to demonstrate defaults.
  252.  
  253. @@ PRECEDENCE.  The first defined range takes precedence over subsequent
  254. @@ definitions.  In practice, this means that [STATUS] 0,$FFFF would
  255. @@ override ALL following definitions!
  256.  
  257. @@ ITEMS.  There are 2 types of StatusLine items:  Visible and Invisible.
  258. @@ Visible:    Defaults to F1 cmHelp, F10 cmMenu and Alt-X cmQuit
  259. @@ Invisible:  Defaults include TV's, but add kbF1 for cmHelp.
  260. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  261.  
  262. @@ [STATUS]0,$FFFF              @@ global override of everything below, since
  263. @@ kbF1 cmHelp                  @@ 0,$FFFF covers the entire context range
  264. @@ kbAltX cmQuit                @@ only allow "quit"
  265.  
  266. @@ [ STATUS ]                   @@ Context defaults to 0,0
  267. @@ f2 help                      @@ Visible; creates ~F1~ Help kbF1 cmHelp
  268. @@ kbF10 cmMenu                 @@ NOT visible; creates kbF10 cmMenu
  269.  
  270. @@ [STATUS] 0                   @@ 2nd context defaults to same as the first,
  271. @@ f3 help                      @@ so [STATUS]45 is the same as [STATUS]45,45
  272. @@ kbF10 cmMenu
  273.  
  274. @@ [STATUS]0,0                  @@ This, and the 2 preceeding, are identical
  275. @@ f4 help                      @@ However, in TurboVision, the 1st definition
  276. @@ kbF10 cmMenu                 @@ takes precedence!
  277.  
  278. @@ [STATUS] 1,1                 @@ Redefine StatusLine for "hcDragging" mode
  279. @@ esc exit                     @@ since this is IT, "ESC" won't work!
  280.  
  281. @@ [STATUS]2,999                @@ This redefines the StatusLine for the
  282. @@ f5 help                      @@ TurboVision reserved values.
  283.  
  284. @@ [STATUS]1000,$FFFF           @@ Hex notation may be used here
  285. @@ f6 help
  286.  
  287.  
  288.  
  289. @@ ===================================================================
  290. @@ ___,/|
  291. @@ \ o_O|
  292. @@ =(_|_)=   "[HINT]" Section.
  293. @@    U
  294. @@   ack!    For hcXXXX constants used elsewhere, needing hints
  295. @@ ===================================================================
  296. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  297. @@ The [hint] keyword denotes a list of hc... constants which you intend
  298. @@ to use in dialog boxes, other objects and/or code.  Since hc...
  299. @@ constants are placed in the "??????_X.TPU" unit, you can use that unit
  300. @@ with other code/units.
  301. @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  302.  
  303. [HINT]                       @@ Generate hcXXXX constants & hint strings
  304. hcJunkHint                   ;;hint for junk
  305. hcChangeDir                  ;;This is how you Change Directorys
  306.